<script>
  print();
</script>
<iframe srcdoc="Hi"></iframe>
<script>
  frames[0].onunload = function () {
    document.open();
  };
</script>